﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.OracleClient;
using System.Text;
using ReflectionStudio.Core.Events;
namespace WPFExcelReport
{

    public class YAB50AV95Data : BaseFunction
    {
        #region -------------function -------------------------
        public int ThreadCount;
        public YAB50AV95Data()
            : base()
        {

        }
        public YAB50AV95Data(Dictionary<string, object> DicGlobalPara)
            : base(DicGlobalPara)
        {
        }
        
        public YAB50AV95Data(OracleConnection _OracleDB, IntexReptServBLClient _proxy)
            : base(_OracleDB, _proxy)
        {

        }
        
        ~YAB50AV95Data()
        {
            if (OracleDB != null)
            {
                OracleDB.Close();
            }
        }
        public DataSet GetABPOS(DataRow dwABPOS)
        {
            DataSet set4Return = new DataSet();
            DataSet setLocal = new DataSet();
            DataTable tableLocal = null;
            try
            {
                OracleCommand or1 = OracleDB.CreateCommand();

                string ABPAUFKRS = dwABPOS["ABPAUFKRS"].ToString();
                string ABPAUFLFD = dwABPOS["ABPAUFLFD"].ToString();
                string ABPAUFPOS = dwABPOS["ABPAUFPOS"].ToString();
                string ABPART = dwABPOS["ARTICLE"].ToString();
                string STARTDATE = dwABPOS["STARTDATE"].ToString();
                string ENDDATE = dwABPOS["ENDDATE"].ToString();
                or1.CommandText = "SELECT P.ABPSTARTDAT,'' AS DFACTORY,G.GAKG1 AS WEI, "
                    + "  P.ABPAUFKRS,P.ABPAUFLFD,P.ABPAUFPOS,P.ABPERLKZ AS STATUS, "
                    + "  P.ABPAUFKRS||'-'||TO_NUMBER(P.ABPAUFLFD)||'-'||TO_NUMBER(P.ABPAUFPOS) AS DORDERNO, "
                    + "  TRIM(P.ABPART)||'-'||TRIM(P.ABPVAR) AS YARN, TRIM(B.GSHANDLNR) AS YARNDES, "
                    + "  TRIM(P.ABPFARBE) AS COLOR,TRIM(C.GSCBEZ) AS COLORDES,'' AS USAGE,'' AS ARTICLE, "
                    + "  '' AS LASTDAT,'' AS ISSWEI,'' AS RECDAT,P.ABPEAKG AS RECWEI,P.ABPENDDAT AS ENDDAT,'' AS REMARK  "
                    + "   FROM ABPOS P,GSDAT B,GSCOLOR C,GAAUF G "
                    + "  WHERE P.ABPMANDANT = B.GSMANDANT AND P.ABPART = B.GSART "
                    + "  AND P.ABPMANDANT= G.GAMANDANT AND P.ABPAUFKRS = G.GAAUFKRS "
                    + "  AND P.ABPAUFLFD = G.GAAUFLFD AND P.ABPAUFPOS = G.GAAUFPOS AND G.GASA = '713' " 
                    + "  AND P.ABPVAR = B.GSVAR AND P.ABPMANDANT = C.GSCMANDANT(+) "
                    + "  AND P.ABPART = C.GSCART(+) AND P.ABPVAR = C.GSCVAR(+) "
                    + "  AND P.ABPFARBE = C.GSCFARBE(+) AND P.ABPMANDANT = '00' "
                    + "  AND P.ABPAUFART = 'GP' AND P.ABPAUFKRS LIKE 'D%' "
                    + "  AND (ABPERLKZ = :ABPERLKZ OR :ABPERLKZ = 'J' ) "
                    + "  AND P.ABPSTARTDAT >= '" + STARTDATE + "' "
                    + "  AND P.ABPSTARTDAT <= '" + ENDDATE + "' "
                    + "  AND ABPAUFKRS LIKE '%" + ABPAUFKRS
                    + "%' AND ABPAUFLFD LIKE '%" + ABPAUFLFD
                    + "%' AND ABPAUFPOS LIKE '%" + ABPAUFPOS + "%' AND ABPART LIKE '%" + ABPART + "%' "
                   ;
                or1.Parameters.Add("ABPERLKZ", OracleType.NVarChar).Value = dwABPOS["ABPERLKZ"].ToString();

                setLocal = Connect2Proxy(or1);

                if (setLocal.Tables.Count > 0)
                {
                    tableLocal = setLocal.Tables[0];
                    tableLocal.TableName = "YABPOS";
                    Queue Q100 = new Queue();
                    Q100.Enqueue("WEI");
                    DivideBy100(tableLocal, Q100);
                    Q100.Enqueue("RECWEI");
                    DivideBy100(tableLocal, Q100);                    
                    byte[] b;
                    string value;
                    string Column = "";
                    string status = "";
                    foreach (DataRow dwTemp in tableLocal.Rows)
                    {
                        status = dwTemp["STATUS"].ToString().Trim();
                        if(status == "J")
                        {
                            dwTemp["STATUS"] = "完成";
                        }
                        Column = "YARNDES";
                        #region
                        b = Encoding.GetEncoding("ISO-8859-1").GetBytes(dwTemp[Column].ToString().Trim());
                        value = Encoding.GetEncoding("gb2312").GetString(b);
                        dwTemp[Column] = value;
                        #endregion
                        Column = "COLORDES";
                        #region
                        b = Encoding.GetEncoding("ISO-8859-1").GetBytes(dwTemp[Column].ToString().Trim());
                        value = Encoding.GetEncoding("gb2312").GetString(b);
                        dwTemp[Column] = value;
                        #endregion

                        #region----------------------- 查询染纱厂----------------------------
                        GetABFOLGE(dwTemp);
                        #endregion

                        #region----------------------- 纱线用途----------------------------
                        GetYARNUSAGE(dwTemp);
                        #endregion

                        #region-----------------------原纱发纱信息----------------------------
                        GetMATYARNINFO(dwTemp);
                        #endregion

                        #region-----------------------色纱收货信息----------------------------
                        GetYARNINFO(dwTemp);
                        #endregion

                        #region-----------------------订单批色信息----------------------------
                        GetCAINFO(dwTemp);
                        #endregion
                    }
                    set4Return.Merge(setLocal);
                }
            }
            catch (Exception ex)
            {
                Tracer.Error(ex.StackTrace, ex); ;
            }
            return set4Return;
        }       
        private DataSet GetYARNUSAGE(DataRow dwABPOS)
        {
            DataSet set4Return = new DataSet();
            dsResult = new DataSet();
            string TableName = "ABAUFM";
            try
            {
                orlReadCommand = OracleDB.CreateCommand();
                orlReadCommand.CommandText = "select b.abpaufkrs,b.abpauflfd,b.abpaufpos, "
                                            + " b.abpwakz,b.ABPART,b.ABPVAR,b.ABPFARBE  "
                                            + " from abaufm a,abpos b  where a.abamandant = b.abpmandant " 
                                            + " AND ABAVKAUFKRS=ABPAUFKRS AND ABAVKAUFLFD=ABPAUFLFD AND ABAVKAUFPOS=ABPAUFPOS "
                                            + " and ABAAPOS>'0001' "
                                            + " AND ABAAUFKRS = :ABAAUFKRS AND ABAAUFLFD=:ABAAUFLFD AND ABAAUFPOS=:ABAAUFPOS";
                orlReadCommand.Parameters.Add("ABAAUFKRS", OracleType.NVarChar).Value = dwABPOS["ABPAUFKRS"].ToString();
                orlReadCommand.Parameters.Add("ABAAUFLFD", OracleType.NVarChar).Value = dwABPOS["ABPAUFLFD"].ToString();
                orlReadCommand.Parameters.Add("ABAAUFPOS", OracleType.NVarChar).Value = dwABPOS["ABPAUFPOS"].ToString();
                dsResult = Connect2Proxy(orlReadCommand);
                if (dsResult.Tables.Count > 0)
                {
                    dsResult.Tables[0].TableName = TableName;
                    #region FOUND
                    string fabric = "";
                    string fabric1 = "";
                    string usage = "";
                    string usage1 = "";

                    foreach (DataRow rowTemp in dsResult.Tables["ABAUFM"].Rows)
                    {
                        if (rowTemp["ABPWAKZ"].ToString() == "R")
                        {                            
                            fabric1 = rowTemp["ABPART"].ToString().Trim() + "-"
                                    + rowTemp["ABPFARBE"].ToString().Trim() + "-"
                                    + rowTemp["ABPVAR"].ToString().Trim()+ ";";
                            if (!fabric.Contains(fabric1))
                            {
                                fabric += fabric1;
                            }
                            usage1 = "纬纱;";  
                            if(!usage.Contains(usage1))
                            {
                                usage += usage1;
                            }
                           
                        }
                        else
                        {
                            if (rowTemp["ABPWAKZ"].ToString() == "K")
                            {
                                DataSet dsResult1 = new DataSet();
                                orlReadCommand = OracleDB.CreateCommand();
                                orlReadCommand.CommandText = "select b.abpaufkrs,b.abpauflfd,b.abpaufpos, "
                                                            + " b.abpwakz,b.ABPART,b.ABPVAR,b.ABPFARBE "
                                                            + " from abaufm a,abpos b where a.abamandant = b.abpmandant " 
                                                            + " AND ABAVKAUFKRS=ABPAUFKRS AND ABAVKAUFLFD=ABPAUFLFD AND ABAVKAUFPOS=ABPAUFPOS "
                                                            + " and ABAAPOS>'0001' "
                                                            + "AND  ABAAUFKRS = :ABAAUFKRS AND ABAAUFLFD=:ABAAUFLFD AND ABAAUFPOS=:ABAAUFPOS";
                                orlReadCommand.Parameters.Add("ABAAUFKRS", OracleType.NVarChar).Value = rowTemp["ABPAUFKRS"].ToString();
                                orlReadCommand.Parameters.Add("ABAAUFLFD", OracleType.NVarChar).Value = rowTemp["ABPAUFLFD"].ToString();
                                orlReadCommand.Parameters.Add("ABAAUFPOS", OracleType.NVarChar).Value = rowTemp["ABPAUFPOS"].ToString();
                                dsResult1 = Connect2Proxy(orlReadCommand);
                                
                                if (dsResult1.Tables.Count > 0)
                                {

                                    foreach (DataRow rowTemp1 in dsResult1.Tables[0].Rows)
                                    {

                                        fabric1 = rowTemp1["ABPART"].ToString().Trim() + "-"
                                                + rowTemp1["ABPFARBE"].ToString().Trim() + "-"
                                                + rowTemp1["ABPVAR"].ToString().Trim() + ";";
                                        if (!fabric.Contains(fabric1))
                                        {
                                            fabric += fabric1;
                                        }
                                        usage1 = "经纱;";
                                        if (!usage.Contains(usage1))
                                        {
                                            usage += usage1;
                                        }
                                    }
                                }
                               
                            }
                            else
                            {
                                if (rowTemp["ABPWAKZ"].ToString() == "G")
                                {
                                    DataSet dsResult2 = new DataSet();
                                    orlReadCommand = OracleDB.CreateCommand();
                                    orlReadCommand.CommandText = "select b.abpaufkrs,b.abpauflfd,b.abpaufpos,"
                                                                + " b.abpwakz,b.ABPART,b.ABPVAR,b.ABPFARBE "
                                                                + " from abaufm a,abpos b where a.abamandant = b.abpmandant "
                                                                + " AND ABAVKAUFKRS=ABPAUFKRS AND ABAVKAUFLFD=ABPAUFLFD AND ABAVKAUFPOS=ABPAUFPOS "
                                                                + " and ABAAPOS>'0001' "
                                                                + "AND  ABAAUFKRS = :ABAAUFKRS AND ABAAUFLFD=:ABAAUFLFD AND ABAAUFPOS=:ABAAUFPOS";
                                    orlReadCommand.Parameters.Add("ABAAUFKRS", OracleType.NVarChar).Value = rowTemp["ABPAUFKRS"].ToString();
                                    orlReadCommand.Parameters.Add("ABAAUFLFD", OracleType.NVarChar).Value = rowTemp["ABPAUFLFD"].ToString();
                                    orlReadCommand.Parameters.Add("ABAAUFPOS", OracleType.NVarChar).Value = rowTemp["ABPAUFPOS"].ToString();
                                    dsResult2 = Connect2Proxy(orlReadCommand);
                                    //dsResult = new DataSet();
                                    if (dsResult2.Tables.Count > 0)
                                    {
                                        foreach (DataRow rowTemp2 in dsResult2.Tables[0].Rows)
                                        {
                                            if (rowTemp2["ABPWAKZ"].ToString() == "R")
                                            {

                                                fabric1 = rowTemp2["ABPART"].ToString().Trim() + "-"
                                                        + rowTemp2["ABPFARBE"].ToString().Trim() + "-"
                                                        + rowTemp2["ABPVAR"].ToString().Trim() + ";";
                                                if (!fabric.Contains(fabric1))
                                                {
                                                    fabric += fabric1;
                                                }
                                                usage1 = "纬纱;";
                                                if (!usage.Contains(usage1))
                                                {
                                                    usage += usage1;
                                                }
                                                                                            
                                            }
                                            else
                                            {
                                                if (rowTemp2["ABPWAKZ"].ToString() == "K")
                                                {
                                                    DataSet dsResult3 = new DataSet();
                                                    orlReadCommand = OracleDB.CreateCommand();
                                                    orlReadCommand.CommandText = " select b.abpaufkrs,b.abpauflfd,b.abpaufpos, "
                                                                                + " b.abpwakz,b.ABPART,b.ABPVAR,b.ABPFARBE "
                                                                                + " from abaufm a,abpos b where a.abamandant = b.abpmandant "
                                                                                + " AND ABAVKAUFKRS=ABPAUFKRS AND ABAVKAUFLFD=ABPAUFLFD AND ABAVKAUFPOS=ABPAUFPOS "
                                                                                + " and ABAAPOS>'0001' "
                                                                                + " AND  ABAAUFKRS = :ABAAUFKRS AND ABAAUFLFD=:ABAAUFLFD AND ABAAUFPOS=:ABAAUFPOS";
                                                    orlReadCommand.Parameters.Add("ABAAUFKRS", OracleType.NVarChar).Value = rowTemp2["ABPAUFKRS"].ToString();
                                                    orlReadCommand.Parameters.Add("ABAAUFLFD", OracleType.NVarChar).Value = rowTemp2["ABPAUFLFD"].ToString();
                                                    orlReadCommand.Parameters.Add("ABAAUFPOS", OracleType.NVarChar).Value = rowTemp2["ABPAUFPOS"].ToString();
                                                    dsResult3 = Connect2Proxy(orlReadCommand);
                                                    
                                                    if (dsResult3.Tables.Count > 0)
                                                    {
                                                        foreach (DataRow rowTemp3 in dsResult3.Tables[0].Rows)
                                                        {
                                                            fabric1 = rowTemp3["ABPART"].ToString().Trim() + "-"
                                                                    + rowTemp3["ABPFARBE"].ToString().Trim() + "-"
                                                                    + rowTemp3["ABPVAR"].ToString().Trim() + ";";
                                                            if (!fabric.Contains(fabric1))
                                                            {
                                                                fabric += fabric1;
                                                            }
                                                            usage1 = "经纱;";
                                                            if (!usage.Contains(usage1))
                                                            {
                                                                usage += usage1;
                                                            }
                                                        }
                                                    }
                                                    
                                                }
                                            }

                                        }
                                    }
                                    
                                }
                                

                            }
                        }
                    }

                    dwABPOS["ARTICLE"] = fabric;
                    dwABPOS["USAGE"] = usage;
                }
                    #endregion
                    set4Return.Merge(dsResult);
                }
            catch (Exception ex)
            {
                Tracer.Error(ex.StackTrace, ex);
            }
            return set4Return;
        }
        private DataSet GetMATYARNINFO(DataRow dwABPOS)
        {
            DataSet set4Return = new DataSet();
            DataSet setLocal = new DataSet();
            DataTable tableLocal = null;
            try
            {
                OracleCommand or1 = OracleDB.CreateCommand();
                or1.CommandText = "SELECT MAX(GABBUCHDAT) AS LASTDAT,SUM(GABKG/1000) AS ISSWEI FROM GABEW "
                    + " WHERE GABAUFKRS = :ABPAUFKRS AND GABAUFLFD = :ABPAUFLFD AND GABAUFPOS = :ABPAUFPOS "
                    + " AND GABBS = '22' ";

                or1.Parameters.Add("ABPAUFKRS", OracleType.NVarChar).Value = dwABPOS["ABPAUFKRS"].ToString();
                or1.Parameters.Add("ABPAUFLFD", OracleType.NVarChar).Value = dwABPOS["ABPAUFLFD"].ToString();
                or1.Parameters.Add("ABPAUFPOS", OracleType.NVarChar).Value = dwABPOS["ABPAUFPOS"].ToString();
                setLocal = Connect2Proxy(or1);
                if (setLocal.Tables.Count > 0)
                {
                    tableLocal = setLocal.Tables[0];
                    tableLocal.TableName = "GABEW";

                    foreach (DataRow dwTemp in tableLocal.Rows)
                    {
                        dwABPOS["LASTDAT"] = dwTemp["LASTDAT"].ToString();
                        dwABPOS["ISSWEI"] = dwTemp["ISSWEI"].ToString();
                    }

                    set4Return.Merge(setLocal);
                }
            }
            catch (Exception ex)
            {
                Tracer.Error(ex.StackTrace, ex); ;
            }
            return set4Return;
        }
        private DataSet GetYARNINFO(DataRow dwABPOS)
        {
            DataSet set4Return = new DataSet();
            DataSet setLocal = new DataSet();
            DataTable tableLocal = null;
            try
            {
                OracleCommand or1 = OracleDB.CreateCommand();
                or1.CommandText = "SELECT MAX(GABBUCHDAT) AS RECDAT FROM GABEW "
                    + " WHERE GABAUFKRS = :ABPAUFKRS AND GABAUFLFD = :ABPAUFLFD AND GABAUFPOS = :ABPAUFPOS "
                    + " AND GABBS = '13' ";

                or1.Parameters.Add("ABPAUFKRS", OracleType.NVarChar).Value = dwABPOS["ABPAUFKRS"].ToString();
                or1.Parameters.Add("ABPAUFLFD", OracleType.NVarChar).Value = dwABPOS["ABPAUFLFD"].ToString();
                or1.Parameters.Add("ABPAUFPOS", OracleType.NVarChar).Value = dwABPOS["ABPAUFPOS"].ToString();
                setLocal = Connect2Proxy(or1);
                if (setLocal.Tables.Count > 0)
                {
                    tableLocal = setLocal.Tables[0];
                    tableLocal.TableName = "GABEW";

                    foreach (DataRow dwTemp in tableLocal.Rows)
                    {
                        dwABPOS["RECDAT"] = dwTemp["RECDAT"].ToString();
                        //dwABPOS["RECWEI"] = dwTemp["RECWEI"].ToString();
                    }

                    set4Return.Merge(setLocal);
                }
            }
            catch (Exception ex)
            {
                Tracer.Error(ex.StackTrace, ex); ;
            }
            return set4Return;
        }
        private DataSet GetABFOLGE(DataRow dwABPOS)
        {
            DataSet set4Return = new DataSet();
            DataSet setLocal = new DataSet();
            DataTable tableLocal = null;
            try
            {            
                OracleCommand or1 = OracleDB.CreateCommand();
                or1.CommandText = " SELECT DISTINCT LSNAME1"
                + " FROM ABFOLGE F,LIEFDAT L "
                + " WHERE ABFMANDANT='00'  AND  ABFAUFKRS=:ABFAUFKRS AND ABFAUFLFD=:ABFAUFLFD AND ABFAUFPOS=:ABFAUFPOS "
                + " AND F.ABFLIEFNR=L.LSLIEFNR AND F.ABFMANDANT = L.LSMANDANT ";

                or1.Parameters.Add("ABFAUFKRS", OracleType.NVarChar).Value = dwABPOS["ABPAUFKRS"].ToString();
                or1.Parameters.Add("ABFAUFLFD", OracleType.NVarChar).Value = dwABPOS["ABPAUFLFD"].ToString();
                or1.Parameters.Add("ABFAUFPOS", OracleType.NVarChar).Value = dwABPOS["ABPAUFPOS"].ToString();
                setLocal = Connect2Proxy(or1);

                if (setLocal.Tables.Count > 0)
                {
                    tableLocal = setLocal.Tables[0];
                    tableLocal.TableName = "ABFOLGE";

                    byte[] b;
                    string value;
                    string sTemp = "", YPRODUCER = "";
                    foreach (DataRow dwTemp in tableLocal.Rows)
                    {
                        b = Encoding.GetEncoding("ISO-8859-1").GetBytes(dwTemp["LSNAME1"].ToString().Trim());
                        value = Encoding.GetEncoding("gb2312").GetString(b);
                        dwTemp["LSNAME1"] = value;
                        sTemp = value + ";";
                        if (!YPRODUCER.Contains(sTemp)
                             && sTemp != ";")
                        {
                            YPRODUCER += sTemp;
                        }
                    }

                    dwABPOS["DFACTORY"] = YPRODUCER;
                    Tracer.Verbose(ABPOS + " 染纱厂", YPRODUCER);
                    set4Return.Merge(setLocal);
                }
            }
            catch (Exception ex)
            {
                Tracer.Error(ex.StackTrace, ex); ;
            }
            return set4Return;
        }
        private DataSet GetCAINFO(DataRow dwABPOS)
        {
            DataSet set4Return = new DataSet();
            DataSet setLocal = new DataSet();
            DataTable tableLocal = null;
            try
            {
                OracleCommand or1 = OracleDB.CreateCommand();
                or1.CommandText = " SELECT TRIM(C.TXTKTEXT) AS REMARK "
                    + "    FROM ABJOUR A,TXTIND B,TXTKON C "
                    + "    WHERE A.ABJMANDANT = B.TXTIMANDANT AND A.ABJKEY = B.TXTISIND "
                    + "    AND B.TXTIMANDANT = C.TXTKMANDANT AND B.TXTIPIND = C.TXTKPIND "
                    + "    AND B.TXTITXTART = 'ABJ' AND A.ABJAGANG = 'CA' "
                    + "    AND A.ABJAUFKRS = :ABPAUFKRS AND A.ABJAUFLFD =:ABPAUFLFD  "
                    + "    AND A.ABJAUFPOS = :ABPAUFPOS ";

                or1.Parameters.Add("ABPAUFKRS", OracleType.NVarChar).Value = dwABPOS["ABPAUFKRS"].ToString();
                or1.Parameters.Add("ABPAUFLFD", OracleType.NVarChar).Value = dwABPOS["ABPAUFLFD"].ToString();
                or1.Parameters.Add("ABPAUFPOS", OracleType.NVarChar).Value = dwABPOS["ABPAUFPOS"].ToString();
                setLocal = Connect2Proxy(or1);
                if (setLocal.Tables.Count > 0)
                {
                    tableLocal = setLocal.Tables[0];
                    tableLocal.TableName = "ABJOUR";
                    byte[] b;
                    string value;
                    string Column = "",remark = "";
                    foreach (DataRow dwTemp in tableLocal.Rows)
                    {
                        Column = "REMARK";                        
                        b = Encoding.GetEncoding("ISO-8859-1").GetBytes(dwTemp[Column].ToString().Trim());
                        value = Encoding.GetEncoding("gb2312").GetString(b);
                        dwTemp[Column] = value;
                        remark += value;
                    }

                    dwABPOS["REMARK"] = remark;
                    set4Return.Merge(setLocal);
                }
            }
            catch (Exception ex)
            {
                Tracer.Error(ex.StackTrace, ex); ;
            }
            return set4Return;
        }
        
        /*public override void BuildABPOS(DataRow dwABPOS)
        {
            DataRow dwNABPOS = dwABPOS.Table.Clone().NewRow();

            try
            {
                dwNABPOS.ItemArray = dwABPOS.ItemArray;
                DataSet set4Return = new DataSet();
                ABPOS = dwNABPOS["ABPAUFKRS"].ToString() + "." + dwNABPOS["ABPAUFLFD"].ToString() + "." + dwNABPOS["ABPAUFPOS"].ToString();
                ABPOS = ThreadCount.ToString() + ": " + ABPOS;
                string ABAVKAUFTYP = "";
                string LSNAME1 = "";
                string sTemp = "";
                
                #region----------------------- 查询染纱厂----------------------------
                GetABFOLGE(dwNABPOS);
                #endregion

                #region----------------------- 纱线用途----------------------------
                GetYARNUSAGE(dwNABPOS);
                #endregion

                #region-----------------------原纱信息----------------------------
                GetMATYARNINFO(dwNABPOS);
                #endregion
            }
            catch (Exception ex)
            {
                Tracer.Error(ABPOS + ex.StackTrace, ex);
            }
            finally
            {
                try
                {
                    dwABPOS.ItemArray = dwNABPOS.ItemArray;
                    string progress = "查询进展:[" + ThreadID.ToString() + "] 完成<-FinishedJobs->/<-TotalJobs->";
                    EventDispatcher.Instance.RaiseStatus(progress, StatusEventType.StartProgress);
                }
                catch (Exception ex)
                {
                    Tracer.Error(ABPOS + ex.StackTrace, ex);
                }
            }
        }*/
        #endregion
    }
}